package com.cloud.order.mapper.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
* (Product) 实体类
*
* @author zhangxun
* @since 2021-01-17
*/
@Data
@TableName(value = "product")
public class Product implements Serializable {
    private static final long serialVersionUID=1L;
    /*** 商品id*/
    @TableId(type = IdType.AUTO)
    private Long id;

    /*** 商品名称*/
    @TableField("name")
    private String name;

    /*** 库存*/
    @TableField("number")
    private Integer number;

    /*** 价格*/
    @TableField("price")
    private BigDecimal price;

    /*** 描述*/
    @TableField("desc")
    private String desc;

    /*** 创建时间*/
    @TableField("create_time")
    @JsonFormat(shape= JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

}